package cn.ad.service;

import cn.ad.handler.SqlSessionHandler;
import cn.ad.model.DropDownModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 非原生创意下，平台与广告形式和尺寸map关系的 实现接口
 * 
 * @author yujuan.zhang
 * @from 2016-12-14
 * @since DSP V2.3
 */
@Service
public class PlatformFormatSizeMapService {

	@Autowired
	private SqlSessionHandler sqlSessionHandler;

	public List<DropDownModel> getPlatformListByAdFormatAndSizeId(Integer adFormat, Integer sizeId) {
		Map<String, Object> mapParams = new HashMap<>(2);
		mapParams.put("adFormat", adFormat);
		mapParams.put("sizeId", sizeId);
		return sqlSessionHandler.selectList("platformFormatSizeMapMapper.select:platforms:by:format:and:sizeId", mapParams);
	}

}
